package com.atguigu.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 
 * @TableName user
 */
@TableName(value ="user")
@Data
@Schema(description = "用户类")
public class User {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @Schema(description = "用户的id")
    private Long id;

    /**
     * 姓名
     */
    @Schema(description = "用户的名字")
    private String name;

    /**
     * 年龄
     */
    @Schema(description = "用户的年龄")
    private Integer age;

    /**
     * 邮箱
     */
    @Schema(description = "用户的邮箱")
    private String email;

    @TableLogic
    @JsonIgnore  // 把类中的属性转为json属性是 需要忽略的字段
    private Integer deleted;
}